package ImageInterface.Homework;

import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JButton;

public class Homework2 {
    public static void main(String[] args) {
        JFrame frame = new JFrame("边界布局管理器");
        frame.setLayout(new BorderLayout());
        frame.add(BorderLayout.EAST, new JButton("EAST"));
        frame.add(BorderLayout.WEST, new JButton("WEST"));
        frame.add(BorderLayout.NORTH, new JButton("NORTH"));
        frame.add(BorderLayout.SOUTH, new JButton("SOUTH"));
        frame.add(BorderLayout.CENTER, new JButton("CENTER"));
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(300, 250);
        frame.setVisible(true);
    }
}
